export const register = {
    path: '/register',
    name: 'register',
    meta: {
        title: '注册',
    },
    // component: () => import('@/view/register/Register')
}

export const login = {
    path: '/login',
    name: 'login',
    meta: {
        title: '登录',
    },
    component: () =>
        import ('@/view/login/Login')
}

export const pasBack = {
    path: '/pasBack',
    name: 'pasBack',
    meta: {
        title: '忘记密码',
    },
    // component: () => import('@/view/forget/PasBack')
}

export const app = {
    path: '/',
    redirect: {
        path: '/login'
    }
}

export const mainRouter = {
    path: '/main',
    component: () =>import ('@/view/Main'),
    children: [
        {
            path: 'roomManage',
            name: 'roomManage',
            meta: {
                title: '会议室管理',
            },
            component: () =>import ('@/view/roomManage/RoomManage')
        },
        {
            path: 'roomManageDetail/:id',
            name: 'roomManageDetail',
            meta: {
                title: '会议室管理详情',
            },
            component: () =>import ('@/view/roomManage/list/RoomManageDetail')
        },
        {
            path: 'deviceManage',
            name: 'deviceManage',
            meta: {
                title: '设备管理',
            },
            component: () => import ('@/view/deviceManage/DeviceManage')
        },
        {
            path: 'meetingManage',
            name: 'meetingManage',
            meta: {
                title: '会议管理',
            },
            component: () => import ('@/view/meetingManage/MeetingManage')
        },
        {
            path: 'videoManage',
            name: 'videoManage',
            meta: {
                title: '声图管理',
            },
            component: () => import ('@/view/videoManage/VideoManage')
        },
        {
            path: 'roleManage',
            name: 'roleManage',
            meta: {
                title: '角色管理',
            },
            component: () => import ('@/view/roleManage/RoleManage')
        },
        {
            path: 'proposalManage',
            name: 'proposalManage',
            meta: {
                title: '委员提案管理',
            },
            component: () => import ('@/view/proposalManage/ProposalManage')
        },
        {
            path: 'postManage',
            name: 'postManage',
            meta: {
                title: '委员履职管理',
            },
            component: () => import ('@/view/postManage/PostManage')
        },
        {
            path: 'terminalManage',
            name: 'terminalManage',
            meta: {
                title: '终端数据管理',
            },
            component: () => import ('@/view/terminalManage/TerminalManage')
        },
    ]
}






export default new VueRouter({
    mode: 'history',
    routes: [
        register,
        login,
        pasBack,
        app,
        mainRouter,
    ]
})